All Functions Used So Far, Week 5

read_excel

{readxl}

Read an Excel file

glm

{base}

Fits generalized linear models

range

{base}

Return range of values

library

{base}

Load an R package

data.frame

{base}

Create a data.frame from vectors

summary

{base}

Obtain summary statistics or detailed regression output

modelsummary

{modelsummary}

Creates regression and data tables

str

{utils}

Get the structure of an R object

log

{base}

log (default base = e)

var

{stats}

Calculate variance

plot

{graphics}

Generic function from base R to produce a plot

which

{base}

return indexes of TRUE entries of a logical vector

group_tt

{tinytable}

Grouping in tinytable

names

{base}

Retrieve names of a list/vector

length

{base}

Returns number of elements in an object

sample

{base}

Takes a sample of the specified size

mean

{base}

Get mean of a vector

cut

{base}

Convert Numeric to Factor

subset

{base}

Return subsets of vectors, matrices or data frames which meet conditions.

as.character

{base}

Coerce a vector to character

setwd

{base}

Set Working Directory

seq

{base}

Create a sequence

mutate

{dplyr}

Modify/create a column in a data frame

expression

{base}

Used in plots to add symbols to axes

ordered

{dplyr}

Create an ordered factor

list

{base}

Create a list object

bar

{base}

Used for annotations, such as “expression(paste(”-“,bar(y)))”

median

{stats}

Get median of a vector

read.csv

{utils}

Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters

binomial

{base}

Family argument in glm()

as.data.frame

{base}

Functions to check if an object is a data frame, or coerce it if possible.

stargazer

{stargazer}

Create a regression output table

par

{graphics}

Set parameters of the plotting device

filter

{dplyr}

Filter out rows of a data frame according to logical vector

c

{base}

Combine values/vectors into a vector

nobs

{gdata}

Compute the number of non-missing observations

sd

{stats}

Get standard deviation of a vector

dnorm

{stats}

Density distribution for the normal distribution

predict

{stats}

Predict Probability

rnorm

{base}

Generate random numbers from a normal distribution

pnorm

{base}

Returns the cumulative distribution function (CDF) of the normal distribution

lm

{base}

Fit a linear model

ifelse

{base}

Return a or b depending on the value of test

head

{utils}

Show first 5 rows of a data frame

min

{base}

Get minimum of a vector

max

{base}

Get maximum of a vector

The end!